<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //解构
        const DUIXING =["劈柴","喂马","周游"];
        //数组解构给变量
        let[a,b,c] = DUIXING;
        console.log(a);
        console.log(b);
        console.log(c);
        //对象解构给变量
        const ZHANG ={
            name:"张三李四",
            age:"123",
            kanren:function(){
                console.log('8464');
            }
        }
        let{name,age,kanren}=ZHANG;
        console.log(name);
        console.log(age);
        console.log(kanren);
        kanren()
    </script>
</body>
</html>